package com.xianyun.book.command;

import com.alibaba.cola.dto.Response;
import com.xianyun.book.domain.gateway.BookGateway;
import com.xianyun.book.domain.order.SalesOrder;
import com.xianyun.book.dto.BookIdleRefreshCmd;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

/**
 * 更新闲置
 * @author ytt
 */
@Component
public class BookIdleRefreshCmdExe {
    @Resource
    private BookGateway bookGateway;

    public Response execute(BookIdleRefreshCmd cmd) {
        bookGateway.refreshBook(new SalesOrder());
        return Response.buildSuccess();
    }
}
